package com.lifeverse.dto;

import com.lifeverse.entity.enums.ConsciousnessLevel;
import com.lifeverse.entity.enums.LifeEntityStatus;
import com.lifeverse.entity.enums.LifeEntityType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 生命体数据传输对象
 */
@Data
@Schema(description = "生命体信息")
public class LifeEntityDTO {

    @Schema(description = "生命体ID", example = "1")
    private Long id;

    @NotBlank(message = "生命体名称不能为空")
    @Size(max = 100, message = "生命体名称长度不能超过100个字符")
    @Schema(description = "生命体名称", example = "智慧企业001", required = true)
    private String name;

    @NotNull(message = "生命体类型不能为空")
    @Schema(description = "生命体类型", example = "CORPORATE", required = true)
    private LifeEntityType type;

    @Schema(description = "生命体状态", example = "ACTIVE")
    private LifeEntityStatus status;

    @Schema(description = "意识水平", example = "INTERMEDIATE")
    private ConsciousnessLevel consciousnessLevel;

    @Size(max = 1000, message = "描述长度不能超过1000个字符")
    @Schema(description = "生命体描述", example = "这是一个专注于创新的企业生命体")
    private String description;

    @Schema(description = "能量值", example = "85.50")
    private BigDecimal energyLevel;

    @Schema(description = "健康度", example = "92.30")
    private BigDecimal healthScore;

    @Schema(description = "智慧值", example = "156.78")
    private BigDecimal wisdomScore;

    @Schema(description = "创造力值", example = "234.56")
    private BigDecimal creativityScore;

    @Schema(description = "协作能力值", example = "78.90")
    private BigDecimal collaborationScore;

    @Schema(description = "最后活跃时间")
    private LocalDateTime lastActiveAt;

    @Schema(description = "出生时间")
    private LocalDateTime birthTime;

    @Schema(description = "进化次数", example = "3")
    private Integer evolutionCount;

    @Schema(description = "最后进化时间")
    private LocalDateTime lastEvolutionAt;

    @Schema(description = "父生命体ID", example = "2")
    private Long parentId;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;

    @Schema(description = "生命体年龄（天数）", example = "45")
    private Long ageInDays;

    @Schema(description = "生命体年龄（小时数）", example = "1080")
    private Long ageInHours;

    @Schema(description = "是否活跃", example = "true")
    private Boolean isActive;

    @Schema(description = "是否可操作", example = "true")
    private Boolean isOperational;
}